
import request from '@/utils/request'


export const login: any = async (data: any) => {

    return await request({
        url: "/user/login ",
        method:"post",
        data: data
    })

}

export const list: any = async (params:object) => {

    return await request({
        url: "/user/list",
        method:"get",
        params
    })

}


export const add: any = async (data:object) => {

    return await request({
        url: "/user/register",
        method:"post",
        data
    })

}

export const edit: any = async (data:Array<Object>) => {

    return await request({
        url: "/user/edit",
        method:"PUT",
        data:data
    })

}